<?php
	####################################################
	# library import and object instance.              #
	####################################################
	include_once('./common.php');


	####################################################
	# request data($_POST AND $_GET FROM $_REQUEST)    #
	####################################################
	# REQUEST(get and post variables)

	# GET(url variables)

	# POST(form variables)

	# Validation(special case validate)

	####################################################
	# implementation                                   #
	####################################################
?>
<?php
	$html->custom_header(TITLE);
	$html->custom_js("{$JS}jquery.1.7.1.min.js");
	$html->custom_js("{$JS}lib.control.js");
	$html->custom_css("{$CSS}basic.css");
?>
<script type="text/javascript" language="javascript">
//<![CDATA[
	var PageAction = {
		validate:function(){
			//*/
			var check = [
				Validation.check_is_checked("#terms_of_use", "이용약관 동의에 체크 하세요."),
				Validation.check_is_checked("#privacy_policy", "개인정보보호정책 동의에 체크 하세요."),
				Validation.check_is_null("#mid", "아이디를 입력하세요."),
				Validation.check_is_idpw("#mid", "아이디를 형식에 맞게 입력하세요."),
				Validation.check_is_null("#mpasswd", "비밀번호를 입력하세요."),
				Validation.check_is_idpw("#mpasswd", "비밀번호를 형식에 맞게 입력하세요."),
				Validation.check_is_null("#mpasswdc", "비밀번호확인을 입력하세요."),
				Validation.check_is_idpw("#mpasswdc", "비밀번호확인을 형식에 맞게 입력하세요."),
				Validation.check_is_equal("#mpasswd", "#mpasswdc", "비밀번호와 비밀번호확인이 일치하는지 확인하세요."),
				Validation.check_is_null("#memail", "이메일을 입력하세요."),
				Validation.check_is_email("#memail", "이메일을 형식에 맞게 입력하세요."),
				Validation.check_is_null("#mphone", "휴대전화를 입력하세요."),
				Validation.check_is_phone("#mphone", "휴대전화를 형식에 맞게 입력하세요."),
				Validation.check_is_do_not_select("#mjob", "직업을 선택하세요."),
				Validation.check_is_do_not_chooesed("msex", "성별을 선택하세요."),
				Validation.check_is_null_textarea("#mmsg", "가입인사를 입력하세요.")
			];
			return Validation.check(check);
			//*/
		}
	}
//]]>
</script>
<?$html->custom_body();?>
<?=$tmp->tiles_header()?>
	<h1>회원가입</h1>
	<form id="formx" name="formx" method="post" action="./sign_join_proc.php" onsubmit="return PageAction.validate();">
		<table width="100%" border="1" cellspacing="3" cellpadding="0">
			<tr>
				<th>이용약관</th>
				<td>
					<label>
						<input type="checkbox" id="terms_of_use" name="terms_of_use" value="y" /> 동의합니다.
					</label>
				</td>
			</tr>
			<tr>
				<th>개인정보보호정책</th>
				<td>
					<label>
						<input type="checkbox" id="privacy_policy" name="privacy_policy" value="y" /> 동의합니다.
					</label>
				</td>
			</tr>
			<tr>
				<th>
					아이디
				</th>
				<td>
					<input type="text" name="mid" id="mid" maxlength="40" value="" />
				</td>
			</tr>
			<tr>
				<th>
					비밀번호
				</th>
				<td>
					<input type="password" name="mpasswd" id="mpasswd" />
				</td>
			</tr>
			<tr>
				<th>
					비밀번호확인
				</th>
				<td>
					<input type="password" name="mpasswdc" id="mpasswdc" />
				</td>
			</tr>
			<tr>
				<th>
					이메일
				</th>
				<td>
					<input type="text" name="memail" id="memail" maxlength="40" />
				</td>
			</tr>
			<tr>
				<th>
					휴대전화
				</th>
				<td>
					<input type="text" name="mphone" id="mphone" maxlength="40" />
				</td>
			</tr>
			<tr>
				<th>
					직업
				</th>
				<td>
					<select name="mjob" id="mjob">
						<option value="">직업선택</option>
						<option value="s">학생</option>
						<option value="b">회사원</option>
						<option value="e">기타</option>
					</select>
				</td>
			</tr>
			<tr>
				<th>
					성별
				</th>
				<td>
					<label>
						<input type="radio" id="msex" name="msex" value="male" /> 남성
					</label>
					<label>
						<input type="radio" id="msex" name="msex" value="female" /> 여성
					</label>
				</td>
			</tr>
			<tr>
				<th>
					가입인사
				</th>
				<td>
					<textarea id="mmsg" name="mmsg" rows="5" cols="80"></textarea>
				</td>
			</tr>
			<tr>
				<th colspan="2">
					<?=NTool::submit_btn();?>
				</th>
			</tr>
		</table>
	</form>
	<?=NTool::btn("뒤로", "Mover.back();");?>
	<?=NTool::btn("인덱스", "Mover.home();");?>
<?=$tmp->tiles_footer()?>
<?php $html->html_footer(); ?>